//package com.lbank.spiderflow.core.config;
//
//import io.github.bonigarcia.wdm.WebDriverManager;
//import jakarta.annotation.PostConstruct;
//import org.slf4j.Logger;
//import org.slf4j.LoggerFactory;
//import org.springframework.context.annotation.Configuration;
//
//@Configuration
//public class AutoConfigWebDriverManager {
//
//    private static final Logger log = LoggerFactory.getLogger(AutoConfigWebDriverManager.class);
//
//    @PostConstruct
//    public void initDriver() {
//        // 自动注入初始化
//        log.info("AutoConfigWebDriverManager start.");
//        try {
//            log.info("chromedriver start.");
//            WebDriverManager.chromedriver().driverVersion("138.0.7204.168").clearDriverCache().setup();
//            log.info("AutoConfigWebDriverManager chromedriver inited.");
//        } catch (Exception e) {
//            log.error("chromedriver init failed.", e);
//        }
////        try {
////            WebDriverManager.firefoxdriver().setup();
////            log.info("AutoConfigWebDriverManager firefoxdriver inited.");
////        } catch (Exception e) {
////            log.error("firefoxdriver init failed.", e);
////        }
//
//        log.info("AutoConfigWebDriverManager end.");
//    }
//}
